<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
<meta name="renderer" content="webkit"/>
<meta name="force-rendering" content="webkit"/>
<title></title>
  <#include "../style.ftl" />
<script type="text/javascript">
var paymethod = 'weixin_pay';
$(document).ready(function () {
  $('.gwccheck').click(function(){
        unChk();
	   if($(this).attr("class")=="gwccheck on"){
	        $(this).removeClass('on');
		}else{
			$(this).addClass('on');
            paymethod = $(this).data('paymethod');
		}
  })
})
function unChk(){
  $('.gwccheck').each(function(item){
    $(this).removeClass('on');
  })
}
function payResult(){
  jQuery.post("${basePath}home/order/payResult", {'orderId':'${params.orderId!}', 'paymethod':paymethod},function(result){
      if(result.success){
        location.href="${basePath}home/paySuccess";
      }else {
        alert(result.msg);
      }
    });
}
</script>
</head>
<body>
<div class="headerbox">
  <div class="header">
    <div class="headerL">
      <a onclick="javascript:history.back(-1)" class="goback"><img src="${staticPath}front/images/goback.png" /></a>
    </div>
    <div class="headerC">
      <p>收银台</p>
    </div>
    <div class="headerR"></div>
  </div>
</div>
<div class="clear"></div>
<div class="hbox"></div>
<div class="kbox"></div>
<div class="paybox">
  <div class="pay3">
    <div class="pay3_L">
      <img src="${staticPath}front/images/pay5.png" data-paymethod="weixin"/><span>银联支付</span>
    </div>
    <div class="pay3_R">
      <div class="gwccheck" data-paymethod="union_pay"></div>
    </div>
  </div>
  <div class="pay3 wx">
    <div class="pay3_L">
      <img src="${staticPath}front/images/pay6.png" /><span>微信支付</span>
    </div>
    <div class="pay3_R">
      <div class="gwccheck on" data-paymethod="weixin_pay"></div>
    </div>
  </div>
</div>
<div class="fbox2"></div>
<div class="hejiBox jiesuan">
  <div class="heji">
    <div class="heji_3"><p>支付：<span>￥${order.orderAmount}</span></p></div>
    <div class="heji_5">
      <a href="javascript:payResult()">付款</a>
    </div>
  </div>
</div>
</body>
<script>

</script>
</html>
